﻿using System;
using System.Collections.Generic;
using System.Text;

namespace StockTrader.DAL.HoseAdapter.FileParser.Structure
{
    public sealed class Le
    {
        //Mã chứng khoán dạng số
        private Int32 mStockNo;
        [FieldLength(4)]
        public Int32 StockNo
        {
            get { return mStockNo; }
            set { mStockNo = value; }
        }

        // Giá khớp
        private Int32 mPrice;
        [FieldLength(4)]
        public Int32 Price
        {
            get { return mPrice; }
            set { mPrice = value; }
        }

        // Tổng khối lượng
        private Int32 mAccumulatedVol;
        [FieldLength(4)]
        public Int32 AccumulatedVol
        {
            get { return mAccumulatedVol; }
            set { mAccumulatedVol = value; }
        }


        // Tổng giá trị
        private Double mAccumulatedVal;
        [FieldLength(8)]
        public Double AccumulatedVal
        {
            get { return mAccumulatedVal; }
            set { mAccumulatedVal = value; }
        }


        //Giá khớp cáo nhất
        private Int32 mHighest;
        [FieldLength(4)]
        public Int32 Highest
        {
            get { return mHighest; }
            set { mHighest = value; }
        }


        // Giá khớp thấp nhất
        private Int32 mLowest;
        [FieldLength(4)]
        public Int32 Lowest
        {
            get { return mLowest; }
            set { mLowest = value; }
        }

        //Thời gian khớp
        private Int32 mTime;
        [FieldLength(4)]
        public Int32 Time
        {
            get { return mTime; }
            set { mTime = value; }
        }



    }

    public class CompactLe
    {
        private int mStockNo;
        public int StockNo
        {
            get { return mStockNo; }
            set { mStockNo = value; }
        }

        private int mPrice;
        public int Price
        {
            get { return mPrice; }
            set { mPrice = value; }
        }

        private int mVolume;
        public int Volume
        {
            get { return mVolume; }
            set { mVolume = value; }
        }

        private int mVolP1;
        public int VolP1
        {
            get { return mVolP1; }
            set { mVolP1 = value; }
        }

        private int mValP1;
        public int ValP1
        {
            get { return mValP1; }
            set { mValP1 = value; }
        }

        private int mVolP2;
        public int VolP2
        {
            get { return mVolP2; }
            set { mVolP2 = value; }
        }

        private int mValP2;
        public int ValP2
        {
            get { return mValP2; }
            set { mValP2 = value; }
        }

        private int mTime;
        public int Time
        {
            get { return mTime; }
            set { mTime = value; }
        }

        private int mAccumulatedVol;
        public int AccumulatedVol
        {
            get { return mAccumulatedVol; }
            set { mAccumulatedVol = value; }
        }

        private double mAccumulatedVal;
        public double AccumulatedVal
        {
            get { return mAccumulatedVal; }
            set { mAccumulatedVal = value; }
        }

        public CompactLe(int stockno, int price, int volume, int vp1, int valp1, int vp2, int valp2, int time, int accvol, double accval)
        {
            this.mStockNo = stockno;
            this.mPrice = price;
            this.mVolume = volume;
            this.mVolP1 = vp1;
            this.mValP1 = valp1;
            this.mVolP2 = vp2;
            this.mValP2 = valp2;
            this.mTime = time;
            this.mAccumulatedVol = accvol;
            this.mAccumulatedVal = accval;
        }


    }

}
